<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
class CreateUserBankCardsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_bank_cards', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id')->comment('用户ID');
            $table->char('bankname')->comment('银行名字');
            $table->char('bank_card')->comment('银行卡号');
            $table->char('mobile')->comment('绑卡手机号');
            $table->timestamps();
        });
        DB::statement("alter table `user_bank_cards` comment'用户银行卡表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_bank_cards');
    }
}
